<h2>Editing topic (<%= link_to 'Show', forum_topic_path(@forum, @topic) %>)</h2>

<%= error_messages_for :topic %>

<% form_for :topic, :url => forum_topic_path(@forum, @topic),
            :html => { :method => :put} do |f| %>

  <div class="prefItem">
    <div class="prefLabel">Forum</div>
    <div class="prefValue"><%= f.text_field :forum_id %></div>
  </div>
  <div class="prefItem">
    <div class="prefLabel">Person</div>
    <div class="prefValue"><%= f.text_field :person_id %></div>
  </div>
  <div class="prefItem">
    <div class="prefLabel">Name</div>
    <div class="prefValue"><%= f.text_field :name %></div>
  </div>
  <div class="prefItem">
    <div class="prefLabel">Posts count</div>
    <div class="prefValue"><%= f.text_field :forum_posts_count %></div>
  </div>
  <div>
    <%= f.submit "Update", :class => "button" %> <%= f.submit 'Cancel', :class => 'button', :id => "cancel" %>
  </div>
<% end %>